using System;
using Director.DomainModels;

namespace Director.ViewModels
{
	abstract class AbstractToolVM : AbstractPaneVM
	{
		public abstract EToolId ToolId { get; }

		public override string ContentId
		{
			get { return ToolId.ToString(); }
		}

		protected AbstractToolVM(MainVM mainVM)
		{
			MainVM = mainVM;
		}

		public MainVM MainVM { get; set; }

		protected override void ExecuteCloseCommand(object obj)
		{
			MainVM.CloseTool(this);
		}

		public override void Closed(object sender, EventArgs e)
		{
			MainVM.ToolClosed(this);
		}
	}
}